//
//  VideoModel.m
//  WuLi
//
//  Created by Gollum on 16/09/02
//  Copyright (c) Gollum. All rights reserved.
//

#import "VideoModel.h"
#import "VideoData.h"

@implementation VideoModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [VideoData class]};
}
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray <VideoData *>*myData = [NSMutableArray array];
    NSArray *valueArray = value;
    if ([key isEqualToString:@"data"]) {
        for (NSDictionary *dic in valueArray) {
            VideoData *video = [VideoData modelWithDic:dic];
            [myData addObject:video];
        }
        _data = myData;
    }

}
@end
